//
//  UILabel+LA.swift
//  LiteAccount
//
//  Created by 刘伟 on 2017/5/5.
//  Copyright © 2017年 刘伟. All rights reserved.
//

import UIKit

extension UILabel {
    class func la_normal(text: String, font: UIFont = UIFont.la_Font(ofSize: 9), color: UIColor = .black, align: NSTextAlignment = .left, contentMode: UIViewContentMode = .center) -> UILabel {
        let object = UILabel()
        object.text = text
        object.textColor =  color
        object.font = font
        object.textAlignment = align
        object.contentMode = contentMode
        return object
    }
}

extension UIButton {
    class func la_normal(text: String, font: UIFont = UIFont.la_Font(ofSize: 9), bgColor: UIColor = .primary, titleColor: UIColor = .normal, cornerRadius: CGFloat = 2) -> UIButton {
        let object = UIButton()
        object.layer.cornerRadius = cornerRadius
        object.backgroundColor = bgColor
        object.setTitle(text, for: .normal)
        object.setTitleColor(titleColor, for: .normal)
        object.titleLabel?.font = font
        return object
    }
}
